#include"myinc.h"

class CValue{
    private:
        int row;
        int col;
        float v_blur;
        float v_balance;
        float v_contrast;
        float max_blur;
        float max_balance;
        float max_contrast;
        float min_blur;
        float min_balance;
        float min_contrast;
        float wei_blur;
        float wei_contrast;
        float wei_balance;
        float b_var;
        float g_var;
        float r_var;
        float b_var_max;
        float g_var_max;
        float r_var_max;
        float b_var_min;
        float g_var_min;
        float r_var_min;
        Mat img_gray;
        Mat img_r;
        Mat img_g;
        Mat img_b;
        //Mat hist_path;
        int histSize[1]; // number of bins
        float hranges[2]; // min and max pixel value
        const float* ranges[1];
        int channels[1]; // only 1 channel used here


    public:
        CValue(int irow, int icol, float max_b, float max_c, float max_ba,float min_b, float min_c, float min_ba, float wei_b, float wei_c, float wei_ba);
        CValue(int irow, int icol);
        void load_img(Mat img);
        void blur_value();
        void hist_value();
        float get_img_value(Mat img);
        float get_blur_value(Mat img);
        float get_contrast_value(Mat img);
        vector<float> get_contrast_value(Mat img, bool flag);
        float get_balance_value(Mat img);
        void sub_wei(int flag);
        void add_wei(int flag);
        ~CValue(){};
};
